ActionController::Routing::Routes.draw do |map|
  
  map.resources :usuario_cuentas
  
  map.resources :role_users
  
  map.resources :metricas

  map.resources :equipos

  map.resource :session

  map.signup '/signup', :controller => 'users', :action => 'new'
  map.login  '/login', :controller => 'sessions', :action => 'new'
  map.logout '/logout', :controller => 'sessions', :action => 'destroy'

	map.resources :estados_trainee, :member => { :get_asignados => :get }
		
	map.resources :finanzas
	
	map.resources :precios	
		
  map.resources :estados_cuenta	
	
  map.resources :curriculums

	map.resources :ogxcurriculums
	
  map.resources :users, :has_many => :cuentas

  map.resources :comunicaciones
    
  map.resources :movimientos
  
  map.resources :reuniones
  
  map.resources :archivos
    
  map.resources :ventas

  map.resources :contactos
  
  map.resources :noticias
  
   map.resources :donaciones 
  
  map.resources :inexchanges, :member => 	{ :borrar_trainee => :get }

	map.resources :marketingtasks 

	map.resources :posicionamientos
	
	map.resources :ingresos, :has_many => :donaciones
	
  map.resources :reportes, :member => { :get_user => :get,:get_chart => :get,:get_equipo => :get  }
  
  map.resources :busquedas

  map.resources :trainees, :has_one => :curriculum #, :has_one => :estado_trainee
    
  map.resources :ogxtrainees, :has_one => :ogxcurriculum
  
  map.resources :cuentas, :has_many => :comunicaciones, :member => { :get_asignados => :get }

  map.cuenta_comunicaciones 'cuenta/:cuenta_id/cuenta_comunicaciones', :controller => 'comunicaciones', :action => 'for_cuenta'
  
  map.welcome_user 'user/:user_id/welcome', :controller => 'users', :action => 'welcome'
  
  map.trainee_historial 'trainee/:trainee_id/historial', :controller => 'trainees', :action => 'historial'
  
  map.account_manager_cuentas 'account_manager/:account_manager_id/cuentas', :controller => 'cuentas', :action => 'for_manager'

  map.show_account_manager 'show_account_manager/:account_manager_id', :controller => 'account_manager', :action => 'manager_detail'
  
  map.buscar_trainees 'buscar_trainees', :controller => 'trainees', :action => 'buscar'
  
  map.buscar_users 'buscar_users', :controller => 'users', :action => 'buscar'
  
  map.estados_trainee_all 'show_all', :controller => 'trainees', :action => 'show_all'

	map.buscar_ogxtrainees 'buscar_ogxtrainees', :controller => 'ogxtrainees', :action => 'buscar'
	
	map.buscar_contactos 'buscar_contactos', :controller => 'contactos', :action => 'buscar'
	
	map.root :controller => 'sessions', :action => 'new'

  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'

	map.cuentas_trainee_all 'show_all', :controller => 'cuentas', :action => 'show_all'

  
end


  # The priority is based upon order of creation: first created -> highest priority.

  # Sample of regular route:
  #   map.connect 'products/:id', :controller => 'catalog', :action => 'view'
  # Keep in mind you can assign values other than :controller and :action

  # Sample of named route:
  #   map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
  # This route can be invoked with purchase_url(:id => product.id)

  # Sample resource route (maps HTTP verbs to controller actions automatically):
  #   map.resources :products

  # Sample resource route with options:
  #   map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }

  # Sample resource route with sub-resources:
  #   map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
  
  # Sample resource route with more complex sub-resources
  #   map.resources :products do |products|
  #     products.resources :comments
  #     products.resources :sales, :collection => { :recent => :get }
  #   end

  # Sample resource route within a namespace:
  #   map.namespace :admin do |admin|
  #     # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
  #     admin.resources :products
  #   end

  # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
  # map.root :controller => "welcome"

  # See how all your routes lay out with "rake routes"

  # Install the default routes as the lowest priority.
  # Note: These default routes make all actions in every controller accessible via GET requests. You should
  # consider removing the them or commenting them out if you're using named routes and resources.
